export default {
  computed: {
    columns () {
        return [
            {
                key: 'sf_code',
                title: {
                    'zh-CN': '班组编码',
                    'en-US': 'sf_code'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                show: true
            },
            {
                key: 'sf_name',
                title: {
                    'zh-CN': '班组名称',
                    'en-US': 'sf_name'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                show: true
            },
            {
                key: 'teamClass',
                title: {
                    'zh-CN': '班次',
                    'en-US': 'team class'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                show: true
            },
            {
                key: 'leader',
                title: {
                    'zh-CN': '班组组长',
                    'en-US': 'leader'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                show: true
            },
            {
                key: 'remark',
                title: {
                    'zh-CN': '备注',
                    'en-US': 'remark'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                show: true
            }
        ];
    },
    // form中列字段
    formColumns () {
        return [
            {
                key: 'sf_code',
                title: {
                    'zh-CN': '班组编码',
                    'en-US': 'sf_code'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                config: { type: 'text' }
            },
            {
                key: 'sf_name',
                title: {
                    'zh-CN': '班组名称',
                    'en-US': 'sf_name'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                config: { type: 'text' }
            },
            {
                key: 'teamClass',
                title: {
                    'zh-CN': '班次',
                    'en-US': 'team class'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                config: { type: 'select', options: this.teamClassOptions }
            },
            {
                key: 'leader',
                title: {
                    'zh-CN': '班组组长',
                    'en-US': 'leader'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                config: { type: 'link', link: this.selectLeader }
            },
            {
                key: 'deptName',
                title: {
                    'zh-CN': '所属部门',
                    'en-US': 'deptName'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                config: { type: 'cascader', options: this.deptOptions }
            },
            {
                key: 'remark',
                title: {
                    'zh-CN': '备注',
                    'en-US': 'remark'
                }[this.G_Locale],
                minWidth: 100,
                align: 'center',
                config: { type: 'textarea' }
            }
        ];
    },
    lang () {
        return {
            'en-US': {
                confirmDelete: 'confirm delete',
                cancel: 'cancel',
                status: 'status',
                remark: 'remark'
            },
            'zh-CN': {
                confirmDelete: '删除确认',
                cancel: '取消',
                status: '状态',
                remark: '备注'
            }
        }[this.G_Locale];
    },
  },
};
